package com.service;

import com.mapper.CourseMapper;
import com.pojo.Course;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @CreateTime: 2022-12-19  19:53
 * @Description: TODO
 * @Version: 1.0.0
 */
@Service
public class CourseServiceImpl implements CourseService {

    @Autowired
    private CourseMapper courseMapper;

    @Override
    public Object insert(Course course) {
        return courseMapper.insert(course);
    }

    @Override
    public Object delete(int id) {
        return courseMapper.delete(id);
    }

    @Override
    public Object update(Course course) {
        return courseMapper.update(course);
    }

    @Override
    public Object queryByCourseName(String courseName) {
        return courseMapper.queryByCourseName(courseName);
    }

    @Override
    public List<Course> pageList(int pageNum, int pageSize) {
        return courseMapper.pageList(pageNum, pageSize);
    }

}
